"""
Created on 17-Aug-2009

@author: dexen
"""

import dexen

class Individual(dexen.Individual):
    def __init__(self):
        self.genotype = None
        self.phenotype = None
        self.width = None
        self.height = None
        self.area = None
        self.revive()
    
    def _rr(self, atr, msg):
        if atr != None:
            return msg
        else: return "!"+msg
        
    def __repr__(self):
        res = "Ind: "
        res += self._rr(self.genotype, "gen ")
        res += self._rr(self.phenotype, "phen ")
        res += "width=%s "%self.width
        res += "height=%s "%self.height
        res += "area=%s "%self.area
        return res
